# $Id$
# Maintainer: Jan de Groot <jgc@archlinux.org>

pkgname=libgnomekbd
pkgver=3.22.0.1
pkgrel=1
pkgdesc="Gnome keyboard library"
url="http://gswitchit.sourceforge.net"
arch=('i686' 'x86_64')
license=('LGPL')
depends=('libxklavier' 'gtk3' 'dconf')
makedepends=('intltool' 'gobject-introspection' git)
options=('!emptydirs')
_commit=b14cf08b3bdafb7d3455f3158c13b334eb26b8fb
source=("git://git.gnome.org/libgnomekbd#commit=$_commit")
sha256sums=('SKIP')

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/-/+/g'
}

prepare() {
  cd $pkgname
  NOCONFIGURE=1 ./autogen.sh
}

build() {
  cd "$pkgname"
  ./configure --prefix=/usr --sysconfdir=/etc \
      --disable-schemas-compile --disable-static
  sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
  make
}

package() {
  cd "$pkgname"
  make DESTDIR="$pkgdir" install
}
